package com.controller;

import com.entity.pojo.ArticleType;
import com.service.ArticleService;
import com.service.ArticleTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/articletype")
public class AtricelTypeController {
    @Autowired
    ArticleService articleService;

    @Autowired
    private ArticleTypeService articleTypeService;

    @RequestMapping("/select")
    public String select(Model model){
        List<ArticleType> articleTypes = articleTypeService.SelectAll();
        model.addAttribute("list",articleTypes);
        return "Typelist";
    }
}
